####################################
# Belgium AI events 37100 - 37199 by Lothos
####################################
# Behavior Flags
#	BELDDay		= Load DDay AI
################
# Minister of Security Section 37100 - 37109
#############################################
event = { # Philippe Van Isacker takes power
	id = 37100
	random = no 
	country = BEL
	persistent = yes
	
	trigger = {
		ai = yes
		minister = 15131 # Philippe Van Isacker
		OR = {
			AND = {
				day = 1
				NOT = { day = 2 }
			}
			NOT = { local_flag = BELSecurityIsacker }
		}
	}

	name = "AI_EVENT"
	style = 0	
	
	date = { day = 1 month = january year = 1936 }
	offset = 1
	deathdate = { day = 29 month = december year = 1948 }

	action_a = {
		command = { type = local_setflag which = BELSecurityIsacker }
		command = { type = ministerofsecurity which = 15131 }
		command = { type = dissent value = -1 }
	}
}
################
# Chief of Staff Section 37110 - 37119
#############################################
################
# Head of Intelligence Section 37120 - 37129
#############################################
################
# Chief of the Army Section 37130 - 37139
#############################################
################
# Armament Minister Section 37140 - 37149
#############################################
event = { # Hendrik de Man takes power
	id = 37140
	random = no 
	country = BEL
	persistent = yes
	
	trigger = {
		ai = yes
		minister = 15056 # Hendrik de Man
		OR = {
			AND = {
				day = 1
				NOT = { day = 2 }
			}
			NOT = { local_flag = BELArmamentMan }
		}
	}

	name = "AI_EVENT"
	style = 0	
	
	date = { day = 1 month = january year = 1936 }
	offset = 1
	deathdate = { day = 29 month = december year = 1948 }

	action_a = {
		command = { type = local_setflag which = BELArmamentMan }
		command = { type = local_clrflag which = BELArmamentGalopin }
		command = { type = armamentminister which = 15056 }
		command = { type = dissent value = -1 }
	}
}
event = { # Alexandre Galopin takes power
	id = 37141
	random = no 
	country = BEL
	persistent = yes
	
	trigger = {
		ai = yes
		minister = 15156 # Alexandre Galopin
		NOT = { minister = 15056 } # Hendrik de Man
		OR = {
			AND = {
				day = 1
				NOT = { day = 2 }
			}
			NOT = { local_flag = BELArmamentGalopin }
		}
	}

	name = "AI_EVENT"
	style = 0	
	
	date = { day = 1 month = january year = 1936 }
	offset = 1
	deathdate = { day = 29 month = december year = 1948 }

	action_a = {
		command = { type = local_clrflag which = BELArmamentMan }
		command = { type = local_setflag which = BELArmamentGalopin }
		command = { type = armamentminister which = 15156 }
		command = { type = dissent value = -1 }
	}
}
################
# Chief of Air Minister Section 37150 - 37159
#############################################
event = { # Jules Iserentant takes power
	id = 37150
	random = no 
	country = BEL
	persistent = yes
	
	trigger = {
		ai = yes
		minister = 15116 # Jules Iserentant
		OR = {
			AND = {
				day = 1
				NOT = { day = 2 }
			}
			NOT = { local_flag = BELChiefAirIserentant }
		}
	}

	name = "AI_EVENT"
	style = 0	
	
	date = { day = 1 month = january year = 1936 }
	offset = 1
	deathdate = { day = 29 month = december year = 1948 }

	action_a = {
		command = { type = local_setflag which = BELChiefAirIserentant }
		command = { type = chiefofair which = 15116 }
		command = { type = dissent value = -1 }
	}
}







#############################################
# Regular AI Events 37160 - 37199
#############################################
################
# Load D-Day AI
#############################################
event = {
	id = 37160
	random = no 
	country = BEL
	persistent = yes
	
	trigger = {
		ai = yes
		flag = DDay
		NOT = { local_flag = BELDDay }
	}

	name = "AI_EVENT"
	style = 0	
	
	date = { day = 1 month = january year = 1936 }
	offset = 1
	deathdate = { day = 29 month = december year = 1948 }

	action_a = {
		command = { type = local_setflag which = BELDDay }
		command = { type = ai which = "switch/Minor_DDay_ENG.ai" }
	}
}
event = {
	id = 37161
	random = no 
	country = BEL
	persistent = yes
	
	trigger = {
		ai = yes
		atwar = yes
		NOT = { flag = DDay }
		local_flag = BELDDay
	}

	name = "AI_EVENT"
	style = 0	
	
	date = { day = 1 month = january year = 1936 }
	offset = 1
	deathdate = { day = 29 month = december year = 1948 }

	action_a = {
		command = { type = local_clrflag which = BELDDay }
		command = { type = ai which = "switch/Minor_DDay_Retrack.ai" }
	}
}
################
# BEL moves their capital
#############################################
event = {
	id = 37162
	random = no
	country = BEL

	trigger = {
		ai = yes
		war = { country = GER country = BEL }
		control = { province = 1142 data = -1 } # must control Lopoldville
		NOT = { 
			control = { province = 50 data = BEL }
			control = { province = 68 data = BEL }
			control = { province = 69 data = BEL }
		}
	}

	name = "AI_EVENT"
	desc = "AI_EVENT"
	
	date = { day = 1 month = january year = 1936 }
	offset = 1
	deathdate = { day = 30 month = december year = 1947 }

	action_a = { 
		command = { type = capital which = 1142 }
		command = { type = set_domestic which = democratic value = 10 }
		command = { type = set_domestic which = political_left value = 3 }
		command = { type = headofstate which = 15001 }
		command = { type = headofgovernment which = 15037 }
		command = { type = foreignminister which = 15044 }
		command = { type = armamentminister which = 15059 }
		command = { type = ministerofsecurity which = 15081 }
		command = { type = ministerofintelligence which = 15093 }
	}
}
